Capacitive switches may be used as a replacement for mechanical switches in applications requiring an on/off action. A conventional capacitor switch can calibrate a single sensor, and apply filtering to try and eliminate changes on a time based algorithm. A typical conventional switch can use a single sensor, which can make the circuit susceptible to invalid readings due to movement of other capacitive bodies near the single sensor. In many applications, a conventional capacitance switch can “trip” when an object comes in close proximity.
A conventional capacitive switch will now be described with reference to FIG. 6. A conventional capacitive switch can operate by measuring a capacitance between an active switch area and an adjacent grounded area. Two conductive plates 602, 604 (or lines or some other geometric structure), one of which is active, can have a finite capacitance C1 between them. When a finger (or other conductive surface) is placed in close proximity, the capacitance changes, as shown by capacitance C2, C3.
Conventional linear slide switches and track pads can often have algorithms which require interpolation of the position between physical switches. These conventional algorithms can use curve-fitting or centroid calculations that can be easily disturbed by imbalanced sensitivity. Systems with individual switches can also be operationally sensitive to variations in switch sensitivity.
Conventional methods of measuring capacitance include charge transfer methods and relaxation oscillator methods. In either case, a capacitance switch sensitivity can be affected by identically by parasitic capacitance as sensitivity can vary as the inverse of the square of the parasitic capacitor.
A conventional relaxation oscillator circuit is shown in FIG. 7. Relaxation oscillator circuit 700 utilizes a current source 702 to charge a capacitor CP. When the voltage on the capacitor reaches a specific threshold VBG, a comparator 704 can be tripped. An output of comparator 704 can drive a switch 706 that can shunt a charge on capacitor CP to ground, resulting in the comparator output returning to an initial state. The transitioning at the output of comparator 704 produces an oscillating signal. Oscillating signal can drive a timer 708.
A timer 708 can generate a count value CNT based on the number of received oscillations from comparator 704 within a set period of time. A count value CNT can be output in response to a READ TIMER signal. A timer 708 can be enabled in response to a ENABLE TIMER signal, and can reset a count value CNT in response to a RESET TIMER signal.
An oscillation rate is determined by the value of the capacitor, the size of the current source and the reset time of the switch. Typical operating frequencies can be in the range of hundreds of kHz to low MHz. Neglecting time delays in the comparator and reset switch, an oscillator frequency ca be represented by relatively simple equations.
A voltage on a capacitor rises linearly to a comparator can be represented by Eq. 1. An operating frequency can be given by Eq. 2.
                              v          ⁡                      (            t            )                          =                                            i              Charge                        ⁢            t                                C            P                                              Eq        .                                  ⁢        1            
                    f        =                              1            t                    =                                    i              Charge                                                      C                P                            ⁢                              V                TH                                                                        Eq        .                                  ⁢        2            where iCharge is a current provided by a current source 702, and CP is the capacitance of capacitor CP.
Referring to FIG. 8, a timing diagram shows the operation of the relaxation oscillator circuit 700 of FIG. 7.
As noted above, capacitance sensitivity can vary as the inverse of the square of the parasitic capacitor. Thus, differences in capacitance of switches can lead to non-uniform response.
A first conventional solution for compensating unwanted capacitance variation can attempt to mechanically balance the capacitive load on each switch. A second conventional compensation solution can be to test a system in the manufacturing process to determine a correction factor for each individual switch.
Disadvantages of both of conventional methods can be that they are cumbersome and difficult to use. The conventional solution of mechanically balancing the capacitive load on each switch can be a difficult analysis step, and often requires multiple board layout attempts to make a particular design work.
The other conventional solution of testing on the manufacturing line to determine a correction factor for each switch can be expensive and difficult. In addition, a conventional solution of measuring a sample of completed systems to establish a generalized set of correction factors does not work well. The sensitivity varies as the inverse of the square of the parasitic capacitor, so small changes are significantly amplified. As a result, what works well in one board sample may not work in the next if the thickness of the board varies by even a few percent.